import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = { auth: true }

export default {
    path: '/live',
    name: 'live',
    meta,
    redirect: { name: 'live' },
    component: layoutHeaderAside,
    children: (pre => [
		{
		    path: 'channel',
		    name: `${pre}channel`,
		    component: _import('live/channelList'),
		    meta: {
		        ...meta,
		        title: '直播频道'
		    }
		},
        {
            path: 'list',
            name: `${pre}list`,
            component: _import('live/liveList'),
            meta: {
                ...meta,
                title: '直播列表'
            }
        },
    ])('live-')
}
